package com.ynu.springbootappdemo.controller;

import com.ynu.springbootappdemo.common.annotation.AuthCheck;
import com.ynu.springbootappdemo.common.constant.UserConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "测试控制器")
@RestController
@RequestMapping("/hello")
@Slf4j
public class HelloController {
    @GetMapping("/")
    @ApiOperation("测试")
    @AuthCheck(mustRole = UserConstant.DEFAULT_ROLE)
    public String hello() {
        return "hello";
    }
}
